Automatic Program Repair by Fixing Contracts
نویسندگان
چکیده
While most debugging techniques focus on patching implementations, there are bugs whose most appropriate corrections consist in fixing the specification to prevent invalid executions—such as to define the correct input domain of a function. In this paper, we present a fully automatic technique that fixes bugs by proposing changes to contracts (simple executable specification elements such as preand postconditions). The technique relies on dynamic analysis to understand the source of buggy behavior, to infer changes to the contracts that emend the bugs, and to validate the changes against general usage. We have implemented the technique in a tool called SpeciFix, which works on programs written in Eiffel, and evaluated it on 44 bugs found in standard data-structure libraries. Manual analysis by human programmers found that SpeciFix suggested repairs that are deployable for 25% of the faults; in most cases, these contract repairs were preferred over fixes for the same bugs that change the implementation.
منابع مشابه
Extraction and Analysis of Knowledge for Automatic Software Repair. (Extraction et l'analyse de connaissance pour la réparation automatique de bugs)
Bug fixing is a frequent activity in the software life cycle. The activity aims at removing the gap between the expected behavior of a program and what it actually does. This gap encompasses different anomalies such as the failure of a program facing to a given scenario. Bug fixing is a task historically done by software developers. However, in the recent years, several automatic software repai...
متن کاملMining Repair Actions for Guiding Automated Program Fixing
Automated program fixing consists of generating source code in order to fix bugs in an automated manner. Our intuition is that automated program fixing can imitate humanbased program fixing. Hence, we present a method to mine repair actions from software repositories. A repair action is a small semantic modification on code such as adding a method call. We then decorate repair actions with a pr...
متن کاملPh.D. Proposal: Automatic Repair of Loops
This PhD topic is about automatic software repair. Automatic software repair is the process of fixing software bugs automatically. Research on automatic software repair has recently started, esp. since the invention of GenProg, an automatic repair system for C code [3]. We have been successfully contributing to this field [4, 5, 6, 1]. The PhD student will explore how to automatically repair a ...
متن کاملCan defects be fixed with weak test suites? An analysis of 50 defects from Defects4J
Automated program repair techniques, which target to generating correct patches for real world defects automatically, have gained a lot of attention in the last decade. Many different techniques and tools have been proposed and developed. However, even the most sophisticated program repair techniques can only repair a small portion of defects while producing a lot of incorrect patches. A possib...
متن کاملEvidence-Based Automated Program Fixing
Many programmers, when they encounter an error, would like to have the benefit of automatic fix suggestions—as long as they are, most of the time, adequate. Initial research in this direction has generally limited itself to specific areas, such as data structure classes with carefully designed interfaces, and relied on simple approaches. To provide high-quality fix suggestions in a broad area o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014